const multer = require("@koa/multer");
const { AVATAR_PATH, PICTURE_PATH,UPLOAD_PATH} = require('../constants/file-path');

// 上传头像的中间件
// 定义中间件
const uploadAvatar=multer({
    dest: UPLOAD_PATH
})

const  handleAvatar=uploadAvatar.single('avatar')
module.exports={
    handleAvatar
}